package com.zhihesj.anan.system.mapper;

import com.zhihesj.anan.system.entity.Role;
import com.zhihesj.anan.system.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author anan
 * @since 2020-04-20
 */
public interface UserMapper extends BaseMapper<User> {

    /**
     * 根据用户名获取角色信息
     * @param username
     * @return
     */
    List<Role> getRolesByUsername(String username);

    List<Role> getRolesById(Long id);

    List<Role> getRolesByIdentifier(String identifier);
}
